package com.hgkj.cloud.base.service.impl;

import com.hgkj.cloud.base.common.PageInfo;
import com.hgkj.cloud.base.dao.TenantOrderPsychologistMapper;
import com.hgkj.cloud.base.domain.TenantOrderPsychologist;
import com.hgkj.cloud.base.service.TenantOrderPsychologistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TenantOrderPsychologistServiceImpl implements TenantOrderPsychologistService {

    @Autowired
    private TenantOrderPsychologistMapper tenantOrderPsychologistMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return tenantOrderPsychologistMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(TenantOrderPsychologist record) {
        return tenantOrderPsychologistMapper.insert(record);
    }

    @Override
    public int insertSelective(TenantOrderPsychologist record) {
        return tenantOrderPsychologistMapper.insertSelective(record);
    }

    @Override
    public TenantOrderPsychologist selectByPrimaryKey(Long id) {
        return tenantOrderPsychologistMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(TenantOrderPsychologist record) {
        return tenantOrderPsychologistMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TenantOrderPsychologist record) {
        return tenantOrderPsychologistMapper.updateByPrimaryKey(record);
    }

    @Override
    public TenantOrderPsychologist getPsychologistsbyPsyid(String psychologist_id) {
        return tenantOrderPsychologistMapper.getPsychologistsbyPsyid(psychologist_id);
    }

    @Override
    public int findAllPsychologistCount(String channel_id) {
        return tenantOrderPsychologistMapper.findAllPsychologistCount(channel_id);
    }

    @Override
    public List<TenantOrderPsychologist> listPsychologistsbyPsyid(String psychologist_id) {
        return tenantOrderPsychologistMapper.listPsychologistsbyPsyid(psychologist_id);
    }

    @Override
    public List<TenantOrderPsychologist> listPsychologists(PageInfo pi, Map<String, Object> map) {
        if(pi != null){
            map.put("currentCount", pi.getCurrentCount());
            map.put("pageSize", pi.getPageSize());
        }
        return tenantOrderPsychologistMapper.listPsychologists(map);
    }
}
